/******************************

#include <stdio.h>
#include <conio.h>
#include <stdlib.h>
#include <iostream>
//for setw, precision()
#include <iomanip>
using namespace std;

struct TuDien{
	char TuTiengAnh[30];
	char NghiaTiengViet[255];
};
struct ds{
	TuDien data;
	ds *next;
};
ds *TimKiem(ds *first, char* TuTiengAnh){
	ds*p = first;
	while (p != NULL)
	{
		if(strcmp(p->data.TuTiengAnh,TuTiengAnh)==)
			break;
		p = p->next;
	}
	return p;
}

ds* ThemTu(ds *first, char *TuTiengAnh, char * NghiaTiengViet)
{
	ds *p= TimKiem(first,TuTiengAnh);
	if (p != NULL){
		strcpy(p->data.NghiaTiengViet,NghiaTiengViet);
	}
	else
	{
		ds *t = (ds*)malloc(sizeof(ds)), *last;
		TuDien td;
		strcpy(td.NghiaTiengViet,NghiaTiengViet);
		strcpy(td.TuTiengAnh,TuTiengAnh);
		t->data = td;
		t->next = NULL;
		if (first ==NULL)
		{
			first = p;
			
		}
		else{
			last->next = p;
		}
		last = p;
	}
	return first;
}

void  *LuuFile(ds *first, char ch){
	ds * p =first;
	FILE *f;
	f=fopen("LuuTru.dat","wt");
	while (p!=NULL){
		if (p->data.TuTiengAnh[0]==ch)
		{
			fprintf(f,"%s:%s\n",p->data.TuTiengAnh,p->data.NghiaTiengViet);
		}
		fclose(f);
		p= p->next;
	}
	
}
ds * TimTheoNghia(ds *first, char* nghia){
	ds *p = first;
	while (p!=NULL)
	{
		if (strcmp(p->data.NghiaTiengViet,nghia)==0)
			break;
		p=p->next;
	}
	return p;
}
ds *Xoa(ds*first, char*NghiaTiengViet){
	ds *p = first, *q;
	do
	{
		p = TimTheoNghia(first,NghiaTiengViet);
		if (p!=NULL)
		{
			if (p==first)
			{
				first = first->next;
			}
			else{
				while(q->next != p){
					q=q->next;
				}
				q->next = p->next;
			}
		}
		free(p);
	} while (p!=NULL);
	return first;
}
void main(){

}

/**********************************/